import json
from flask import render_template, request
from . import front

@front.route('/')

def _index():
    
    if request.cookies.get('search_history'):

        search_history: list = json.loads(request.cookies.get('search_history')) 

    else:
        search_history = []

    return render_template(r'index.html',search_history=search_history)